ALMaSS  1.0
The Animal, Landscape and Man Simulation System
Rabbit.cpp File Reference

The main source code for all rabbit lifestages and associated classes More...

#include <iostream>
#include <fstream>
#include <vector>
#include "../BatchALMaSS/ALMaSS_Setup.h"
#include "../ALMaSSDefines.h"
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../Rabbit/Rabbit.h"
#include "../Rabbit/Rabbit_Population_Manager.h"
#include "../BatchALMaSS/BoostRandomGenerators.h"

Variables

boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
 
MapErrorMsgg_msg
 This pointer provides access the to the internal ALMaSS error message system. More...
 
int g_rabbitexploredistance
 
int g_land_width
 
CfgBool cfg_RabbitUseReproOutput
 
CfgBool cfg_RabbitUseNatalDispersalRecord
 
CfgInt cfg_RabbitUseNatalDispersalRecordAge
 
CfgBool l_pest_enable_pesticide_engine
 
CfgInt cfg_rabbitdensitydependencedelay
 
int g_counter = 0
 
static CfgFloat cfg_young_base_mort ("RABBIT_YOUNGBASEMORT", CFG_CUSTOM, 0.038)
 Input variable. The daily base level for young mortality before any modifiers are applied. More...
 
static CfgFloat cfg_juvenile_base_mort ("RABBIT_JUVENILEBASEMORT", CFG_CUSTOM, 0.004)
 Input variable. The daily base level for juvenile mortality before any modifiers are applied. More...
 
static CfgFloat cfg_adult_base_mort ("RABBIT_ADULTBASEMORT", CFG_CUSTOM, 0.00013)
 Input variable. The daily base level for adult mortality before any modifiers are applied. More...
 
CfgFloat cfg_maxForageHeight ("RABBIT_MAXFORAGEHEIGHT", CFG_CUSTOM, 30.0)
 Input variable. The maximum height desirable for forage vegetation. More...
 
CfgFloat cfg_minForageDigestability ("RABBIT_MINFORAGEDIGESTABILITY", CFG_CUSTOM, 0.50)
 Input variable. Input variable. The minimum digestability desirable for forage vegetation. More...
 
CfgFloat cfg_dispersalmortperm ("RABBIT_DISPERSALMORTPERM", CFG_CUSTOM, 0.0002)
 Input variable. The additional mortality rate with distance for between warren dispersal. More...
 
CfgFloat cfg_RabbitPesticideResponse ("RABBIT_PESTICDERESPONSETHRESHOLD", CFG_CUSTOM, 0.00001)
 Input variable. The threshold above which a rabbit will be killed if it ingests pesticide. More...
 
CfgFloat cfg_globaldisease_probability ("RABBIT_GLOBALDISEASEPROBCONSTANT", CFG_CUSTOM, 0.05)
 Input variable. A constant use to calculate the probability of density related disease. More...
 
CfgInt cfg_rabbitdiggingtime ("RABBIT_DIGGINGTIME", CFG_CUSTOM, 10)
 Input variable. Minimum burrow construction time in days. More...
 
CfgFloat cfg_rabbitdendepscaler ("RABBIT_DENSITYDEPSCALER", CFG_CUSTOM, 4.5)
 Input variable. Average family size for calculating carrying capacity. More...
 
static CfgFloat cfg_forageareamortscaler ("RABBIT_FORAGEAREAMORTSCALER", CFG_CUSTOM, 60.0)
 Input variable. A constant used to increase bad weather mortality as a function of the proportion of forage available. More...
 
CfgFloat cfg_rabbitminkits ("RABBIT_MINKITS", CFG_CUSTOM, 1.0)
 The minimum number of kits in a litter. More...
 
CfgFloat cfg_rabbitmaxkits ("RABBIT_MAXKITS", CFG_CUSTOM, 9.6)
 The maximum number of kits in a litter. More...
 
static CfgFloat cfg_rabbitsocialreproductionthreshold ("RABBIT_SOCIALREPROTHRESHOLD", CFG_CUSTOM, 2.3)
 The threshold at which social reproduction reduction is tested. 1.0 means 50% chance of reproduction for subordinates. More...
 
static CfgFloat cfg_rabbitminwarrensize ("RABBIT_MINWARRENSIZE", CFG_CUSTOM, 2)
 The minimum size of a warren. More...
 
static CfgFloat cfg_rabbitmaxwarrensize ("RABBIT_MAXWARRENSIZE", CFG_CUSTOM, 10)
 Use to calculate the maximum size of a warren. Add min to get the real maximum warren size. More...
 
static CfgFloat cfg_litterabsorptionconstant ("RABBIT_LITTERABSOPRTIONCONST", CFG_CUSTOM, 1.8)
 Used to calculate the chance of litter reabsorption depending on forage conditions. More...
 
CfgFloat cfg_rabbit_pesticidedegradationrate ("RABBIT_PESTICIDEDEGRADATIONRATE", CFG_CUSTOM, 0.0)
 Holds 1-proportion of decay of body burden of pesticide per day. Default of 0.0 will remove all body burden pesticide at the end of each day. More...
 

Detailed Description

The main source code for all rabbit lifestages and associated classes

Version of November 2015
By Chris J. Topping

Variable Documentation

◆ cfg_adult_base_mort

CfgFloat cfg_adult_base_mort("RABBIT_ADULTBASEMORT", CFG_CUSTOM, 0.00013) ( "RABBIT_ADULTBASEMORT"  ,
CFG_CUSTOM  ,
0.  00013 
)
static

Input variable. The daily base level for adult mortality before any modifiers are applied.

Referenced by Rabbit_Adult::Rabbit_Adult().

◆ cfg_dispersalmortperm

CfgFloat cfg_dispersalmortperm("RABBIT_DISPERSALMORTPERM", CFG_CUSTOM, 0.0002) ( "RABBIT_DISPERSALMORTPERM"  ,
CFG_CUSTOM  ,
0.  0002 
)

Input variable. The additional mortality rate with distance for between warren dispersal.

◆ cfg_forageareamortscaler

CfgFloat cfg_forageareamortscaler("RABBIT_FORAGEAREAMORTSCALER", CFG_CUSTOM, 60.0) ( "RABBIT_FORAGEAREAMORTSCALER"  ,
CFG_CUSTOM  ,
60.  0 
)
static

Input variable. A constant used to increase bad weather mortality as a function of the proportion of forage available.

Referenced by Rabbit_Warren::st_WarrenBeing().

◆ cfg_globaldisease_probability

CfgFloat cfg_globaldisease_probability("RABBIT_GLOBALDISEASEPROBCONSTANT", CFG_CUSTOM, 0.05) ( "RABBIT_GLOBALDISEASEPROBCONSTANT"  ,
CFG_CUSTOM  ,
0.  05 
)

Input variable. A constant use to calculate the probability of density related disease.

Referenced by Rabbit_Warren::CalcDisease().

◆ cfg_juvenile_base_mort

CfgFloat cfg_juvenile_base_mort("RABBIT_JUVENILEBASEMORT", CFG_CUSTOM, 0.004) ( "RABBIT_JUVENILEBASEMORT"  ,
CFG_CUSTOM  ,
0.  004 
)
static

Input variable. The daily base level for juvenile mortality before any modifiers are applied.

Referenced by Rabbit_Juvenile::Rabbit_Juvenile().

◆ cfg_litterabsorptionconstant

CfgFloat cfg_litterabsorptionconstant("RABBIT_LITTERABSOPRTIONCONST", CFG_CUSTOM, 1.8) ( "RABBIT_LITTERABSOPRTIONCONST"  ,
CFG_CUSTOM  ,
1.  8 
)
static

Used to calculate the chance of litter reabsorption depending on forage conditions.

Referenced by Rabbit_Warren::UpdateForageInformation().

◆ cfg_maxForageHeight

CfgFloat cfg_maxForageHeight("RABBIT_MAXFORAGEHEIGHT", CFG_CUSTOM, 30.0) ( "RABBIT_MAXFORAGEHEIGHT"  ,
CFG_CUSTOM  ,
30.  0 
)

Input variable. The maximum height desirable for forage vegetation.

◆ cfg_minForageDigestability

CfgFloat cfg_minForageDigestability("RABBIT_MINFORAGEDIGESTABILITY", CFG_CUSTOM, 0.50) ( "RABBIT_MINFORAGEDIGESTABILITY"  ,
CFG_CUSTOM  ,
0.  50 
)

Input variable. Input variable. The minimum digestability desirable for forage vegetation.

◆ cfg_rabbit_pesticidedegradationrate

CfgFloat cfg_rabbit_pesticidedegradationrate("RABBIT_PESTICIDEDEGRADATIONRATE", CFG_CUSTOM, 0.0) ( "RABBIT_PESTICIDEDEGRADATIONRATE"  ,
CFG_CUSTOM  ,
0.  0 
)

Holds 1-proportion of decay of body burden of pesticide per day. Default of 0.0 will remove all body burden pesticide at the end of each day.

◆ cfg_rabbitdendepscaler

CfgFloat cfg_rabbitdendepscaler("RABBIT_DENSITYDEPSCALER", CFG_CUSTOM, 4.5) ( "RABBIT_DENSITYDEPSCALER"  ,
CFG_CUSTOM  ,
4.  5 
)

Input variable. Average family size for calculating carrying capacity.

Referenced by Rabbit_Warren::InitEvaluation().

◆ cfg_rabbitdensitydependencedelay

CfgInt cfg_rabbitdensitydependencedelay
extern

◆ cfg_rabbitdiggingtime

CfgInt cfg_rabbitdiggingtime("RABBIT_DIGGINGTIME", CFG_CUSTOM, 10) ( "RABBIT_DIGGINGTIME"  ,
CFG_CUSTOM  ,
10   
)

Input variable. Minimum burrow construction time in days.

Referenced by Rabbit_Warren::Rabbit_Warren().

◆ cfg_rabbitmaxkits

CfgFloat cfg_rabbitmaxkits("RABBIT_MAXKITS", CFG_CUSTOM, 9.6) ( "RABBIT_MAXKITS"  ,
CFG_CUSTOM  ,
9.  6 
)

The maximum number of kits in a litter.

◆ cfg_rabbitmaxwarrensize

CfgFloat cfg_rabbitmaxwarrensize("RABBIT_MAXWARRENSIZE", CFG_CUSTOM, 10) ( "RABBIT_MAXWARRENSIZE"  ,
CFG_CUSTOM  ,
10   
)
static

Use to calculate the maximum size of a warren. Add min to get the real maximum warren size.

Referenced by Rabbit_Warren::InitEvaluation().

◆ cfg_rabbitminkits

CfgFloat cfg_rabbitminkits("RABBIT_MINKITS", CFG_CUSTOM, 1.0) ( "RABBIT_MINKITS"  ,
CFG_CUSTOM  ,
1.  0 
)

The minimum number of kits in a litter.

◆ cfg_rabbitminwarrensize

CfgFloat cfg_rabbitminwarrensize("RABBIT_MINWARRENSIZE", CFG_CUSTOM, 2) ( "RABBIT_MINWARRENSIZE"  ,
CFG_CUSTOM  ,
 
)
static

The minimum size of a warren.

Referenced by Rabbit_Warren::InitEvaluation().

◆ cfg_RabbitPesticideResponse

CfgFloat cfg_RabbitPesticideResponse("RABBIT_PESTICDERESPONSETHRESHOLD", CFG_CUSTOM, 0.00001) ( "RABBIT_PESTICDERESPONSETHRESHOLD"  ,
CFG_CUSTOM  ,
0.  00001 
)

Input variable. The threshold above which a rabbit will be killed if it ingests pesticide.

Referenced by Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), and Rabbit_Female::InternalPesticideHandlingAndResponse().

◆ cfg_rabbitsocialreproductionthreshold

CfgFloat cfg_rabbitsocialreproductionthreshold("RABBIT_SOCIALREPROTHRESHOLD", CFG_CUSTOM, 2.3) ( "RABBIT_SOCIALREPROTHRESHOLD"  ,
CFG_CUSTOM  ,
2.  3 
)
static

The threshold at which social reproduction reduction is tested. 1.0 means 50% chance of reproduction for subordinates.

Referenced by Rabbit_Female::st_GiveBirth().

◆ cfg_RabbitUseNatalDispersalRecord

CfgBool cfg_RabbitUseNatalDispersalRecord
extern

Referenced by Rabbit_Base::BeginStep().

◆ cfg_RabbitUseNatalDispersalRecordAge

CfgInt cfg_RabbitUseNatalDispersalRecordAge
extern

Referenced by Rabbit_Base::BeginStep().

◆ cfg_RabbitUseReproOutput

CfgBool cfg_RabbitUseReproOutput
extern

Referenced by Rabbit_Female::st_Dying().

◆ cfg_young_base_mort

CfgFloat cfg_young_base_mort("RABBIT_YOUNGBASEMORT", CFG_CUSTOM, 0.038) ( "RABBIT_YOUNGBASEMORT"  ,
CFG_CUSTOM  ,
0.  038 
)
static

Input variable. The daily base level for young mortality before any modifiers are applied.

Referenced by Rabbit_Young::Rabbit_Young().

◆ g_counter

int g_counter = 0

Referenced by Rabbit_Base::WalkTo().

◆ g_land_width

int g_land_width
extern

◆ g_msg

MapErrorMsg* g_msg
extern

This pointer provides access the to the internal ALMaSS error message system.

Referenced by OptimisingFarm::ActualProfit(), Landscape::AddBeetleBanks(), Partridge_Covey::AddMember(), AlleleFreq::AlleleFreq(), AlleleFreq1616::AlleleFreq1616(), AlleleFreq256_16::AlleleFreq256_16(), AOR_Probe::AOR_Probe(), LE_TypeClass::BackTranslateEleTypes(), LE_TypeClass::BackTranslateVegTypes(), Goose_Population_Manager::BirdsShot(), Goose_Population_Manager::BirdsToShootAtPoly(), Landscape::BorderAdd(), Landscape::BorderNeed(), Landscape::BorderScan(), Skylark_Population_Manager::BreedingPairsOutput(), Skylark_Population_Manager::BreedingSuccessProbeOutput(), Skylark_Female::CalcFoodTime(), RasterMap::CellReplacementNeighbour(), Landscape::CentroidSpiralOut(), Farm::CheckRotationManagementLoop(), Crop::ChooseNextCrop(), Partridge_Population_Manager::CloseParOutputFiles(), FarmManager::ConnectFarm(), Landscape::ConsolidatePolys(), CoveyManager::CoveyManager(), FarmManager::CreateFarms(), k_factors::CreateInfoDatabaseFile(), CreatePopulationManager(), CropRotation::CropRotation(), Calendar::DayLength(), AnimalFarm::determineMinFodder(), Hunter_Population_Manager::DistributeHunters(), Hunter_Population_Manager::DistributeHuntersByRules(), Hunter_Population_Manager::DoFirst(), Vole_Population_Manager::DoFirst(), RodenticideManager::DoPlaceBait(), FarmManager::DumpFarmrefs(), k_factors::DumpInfoDatabase(), k_factors::DumpInfoDatabase1(), Landscape::DumpMapGraphics(), SkTerritories::DumpMapGraphics(), Landscape::DumpMapInfoByArea(), PesticideMap::DumpPMap(), Configurator::DumpSymbols(), Landscape::DumpTreatCounters(), Partridge_Population_Manager::EvalHabitatQual(), Landscape::EventDump(), Landscape::EventDumpPesticides(), Landscape::EventtypeToString(), Configurator::ExtractString(), probe_data::FileAppendOutput(), OptimisingFarm::Find_neighbour_to_imitate(), FarmManager::FindClosestFarm(), FarmManager::FindClosestFarmOpenness(), FarmManager::FindClosestFarmOpennessProb(), FarmManager::FindClosestFarmOpennessProbNearRoostIsBest(), FarmManager::FindClosestFarmOpennessProbSmallIsBest(), OptimisingFarm::findCropByName(), OptimisingFarm::findCropByName_almass(), FarmManager::FindFarmWithOpenness(), FarmManager::FindFarmWithRandom(), Skylark_Population_Manager::FledgelingProbeOutput(), Landscape::ForceArea(), RasterMap::Get(), DataForOptimisation::Get_farmType(), GeneticMaterial1616::GetAllele(), FarmManager::GetFarmCentroid(), FarmManager::GetFarmPtr(), CropRotation::GetFirstCrop(), CropRotation::GetNextCrop(), FarmManager::GetRenumberedFarmRef(), Landscape::GISASCII_Output(), Partridge_Covey::HabitatEvalPoly(), OptimisingFarm::HandleEvents(), Hunter_Population_Manager::HunterLeaderMessage(), Landscape::IncTreatCounter(), Goose_Population_Manager::InHuntingSeason(), THare_Population_Manager::Init(), TrapLineMap::Init(), MovementMap::Init(), Hunter_Population_Manager::Init(), Partridge_Population_Manager::Init(), Vole_Population_Manager::Init(), RasterMap::Init1(), RasterMap::Init2(), OptimisingFarm::Initialize(), Farm::InitiateManagement(), Landscape::InitOsmiaBeeNesting(), Bembidion_Adult::InternalPesticideHandlingAndResponse(), Rabbit_Juvenile::InternalPesticideHandlingAndResponse(), Rabbit_Male::InternalPesticideHandlingAndResponse(), Rabbit_Female::InternalPesticideHandlingAndResponse(), Farm::InvIntPartition(), k_factors::k_factors(), Landscape::Landscape(), Farm::LeSwitch(), Rabbit_Population_Manager::LoadWarrenLocations(), main(), OptimisingFarm::Make_rotations(), Farm::Management(), OptimisingFarm::Match_crop_to_field(), Partridge_Covey::MoveCanMove(), Partridge_Covey::MoveDistance(), Partridge_Covey::NestBadArea(), Landscape::NewElement(), Newt_Population_Manager::Newt_Population_Manager(), Bembidion_Pupae::OnFarmEvent(), Vole_JuvenileMale::OnFarmEvent(), Vole_JuvenileFemale::OnFarmEvent(), probe_data::OpenFile(), probe_data::OpenForAppendToFile(), Vole_Population_Manager::OpenSexRatiosProbe(), Skylark_Population_Manager::OpenTheBreedingPairsProbe(), Skylark_Population_Manager::OpenTheBreedingSuccessProbe(), Population_Manager::OpenTheMonthlyRipleysOutputProbe(), Population_Manager::OpenTheReallyBigProbe(), Population_Manager::OpenTheRipleysOutputProbe(), Configurator::ParseCfgLine(), Partridge_Communication::PassMessage(), PollenNectarDevelopmentData::PollenNectarDevelopmentData(), Landscape::PolysDump(), Landscape::PolysRenumber(), Landscape::PolysValidate(), Landscape::PolytypeToString(), SkTerritories::PreFillQualGrid(), FarmManager::PrintOutput(), OptimisingFarm::randomizeCropList(), RasterMap::RasterMap(), VegElement::ReadBugPercentageFile(), FarmManager::ReadCropsData_perFarm_and_Soil_and_Size_almass(), FarmManager::ReadCropsData_perFarmType_almass(), FarmManager::ReadCropsData_perSoilType_almass(), Landscape::ReadPolys2(), Farm::ReadRotation(), Configurator::ReadSymbols(), Farm::RemoveField(), GooseActiveForageLocation::RemoveGeese(), Partridge_Covey::RemoveMember(), Landscape::RemoveSmallPolygons(), Hunter_Population_Manager::RuleSet10Based(), Partridge_Covey::SanityCheck(), CoveyManager::SanityCheck1(), Partridge_Covey::SanityCheck2(), Partridge_Covey::SanityCheck3(), Partridge_Covey::SanityCheck4(), Pesticide::SavePPM(), Rabbit_Population_Manager::SaveWarrenLocations(), CfgFloat::set(), CfgInt::set(), GeneticMaterial1616::SetAllele(), Configurator::SetCfgBool(), Configurator::SetCfgFloat(), Configurator::SetCfgGatekeeper(), Configurator::SetCfgInt(), Configurator::SetCfgStr(), Hunter_Population_Manager::SetHuntingSeason(), Partridge_Covey::SetUncle(), PlantGrowthData::SetVegNum(), Configurator::ShowIdType(), Skylark_Female::st_Finding_Territory(), Skylark_Female::st_Laying(), Skylark_Female::st_MakingNest(), Bembidion_Egg_List::Step(), Bembidion_Larvae::Step(), Bembidion_Adult::Step(), Partridge_Covey::SupplyChickAge(), Partridge_Covey::SupplyDistanceMoved(), Partridge_Covey::SupplyFoodToday(), OptimisingFarm::total(), OptimisingFarm::Translate_crops_to_almass(), FarmManager::TranslateAnimalsCodes(), FarmManager::TranslateCropCodes(), FarmManager::TranslateCropsCodes(), FarmManager::TranslateCropVariablesCodes(), LE_TypeClass::TranslateEleTypes(), FarmManager::TranslateFarmCodes(), FarmManager::TranslateFarmSizeCodes(), FarmManager::TranslateLivestockParametersCodes(), FarmManager::TranslateParametersCodes(), FarmManager::TranslateSoilCodes(), LE_TypeClass::TranslateVegTypes(), Landscape::UnsprayedMarginAdd(), UserDefinedFarm::UserDefinedFarm(), Landscape::VegDump(), PlantGrowthData::VegTypeToCurveNum(), Landscape::VegtypeToString(), Landscape::Warn(), Weather::Weather(), and Landscape::~Landscape().

◆ g_rabbitexploredistance

int g_rabbitexploredistance
extern

◆ g_rand_uni

◆ l_pest_enable_pesticide_engine

CfgBool l_pest_enable_pesticide_engine
extern